"""
select
department.name as 'Department', a.name as 'Employee', a.salary as 'Salary'
from
(select *, dense_rank() over(partition by departmentId order by salary desc) as 'rank'
from
Employee) a left join department
on
a.departmentId=department.id
where
a.rank <= 3
"""